package com.tengju.user.application.archives;

import com.tengju.user.domain.model.sign.StarContractInfo;
import com.tengju.user.domain.model.sign.StarContractRepository;
import com.tengju.user.domain.model.user.UserIdCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;

@Service
@Slf4j
public class StarContractService {

    @Resource
    StarContractRepository starContractRepository;


    public StarContractInfo getStarAgreementInfo(UserIdCode idCode, Integer starRole) {
        StarContractInfo contractInfo = starContractRepository.getByIdCodeAndType(idCode, starRole);
        if (contractInfo == null) {
            return null;
        }
        return contractInfo;
    }

}
